import { useContext } from "react";

import CountContext from "./context/CountContext";

export default function Son() {
  // 通过 useContext hook 来接受 Context.Provider 提供的数据
  const data = useContext(CountContext);
  console.log(data); // {count: 0}

  return <div>Son {data.count}</div>;
}
